<?php if ($pager->haveToPaginate()): ?>
    <div class="pagination">
        <ul class="pages_ul">
            <a class="front" href="<?php echo url_for($url) ?>?page=1"><img src="<?php echo image_path('buttons/bt_first.png') ?>" alt="First page" title="First page" /><li></li></a>
            <a class="front" href="<?php echo url_for($url) ?>?page=<?php echo $pager->getPreviousPage() ?>"><img src="<?php echo image_path('buttons/bt_previous.png') ?>" alt="Previous page" title="Previous page" /><li></li></a>

            <?php foreach ($pager->getLinks() as $page): ?>
                <?php if ($page == $pager->getPage()): ?>
                    <a href="<?php echo url_for($url) ?>?page=<?php echo $page ?>"><li class="bt_page"><span class="pager_bt_txt"><?php echo $page ?></span></li></a>
                <?php else: ?>
                    <a href="<?php echo url_for($url) ?>?page=<?php echo $page ?>"><li class="bt_page"><span class="pager_bt_txt"><?php echo $page ?></span></li></a>
                <?php endif; ?>
            <?php endforeach; ?>

            <a href="<?php echo url_for($url) ?>?page=<?php echo $pager->getNextPage() ?>"><img src="<?php echo image_path('buttons/bt_next.png') ?>" alt="Next page" title="Next page" /></a>
            <a href="<?php echo url_for($url) ?>?page=<?php echo $pager->getLastPage() ?>"><img src="<?php echo image_path('buttons/bt_last.png') ?>" alt="Last page" title="Last page" /></a>
        </ul>
    </div>
<?php endif; ?>

<div class="pagination_desc">
    <strong><?php echo count($pager) ?></strong> Total records

    <?php if ($pager->haveToPaginate()): ?>
        - page <strong><?php echo $pager->getPage() ?>/<?php echo $pager->getLastPage() ?></strong>
    <?php endif; ?>
</div>